import turtle

# 函数正方形
# 缺省
def square(color,  dis=100):
    print('''-------------------''')
    turtle.fillcolor(color)
    turtle.begin_fill()
    for i in range(4):
        turtle.right(90)
        turtle.forward(dis)
    turtle.end_fill()

def goto(pos):
    turtle.up()
    turtle.goto(pos)
    turtle.down()

square('green')
goto((0, 100))
square('cyan', 100)
goto((100, 100))
square('green', 100)
goto((100, 0))
square('cyan', 100)


turtle.done()